# Contributor: Alex Yam <alex@alexyam.com>
# Maintainer: Alex Yam <alex@alexyam.com>
pkgname=libspng
pkgver=0.7.2
pkgrel=0
pkgdesc="modern alternative to libpng"
url="https://github.com/randy408/libspng"
arch="all"
license="BSD-2-Clause"
makedepends="meson zlib-dev"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/randy408/libspng/archive/refs/tags/v$pkgver.tar.gz"

build() {
	abuild-meson \
		-Ddefault_library=both \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
924a8148aeb485ba229e99afc75dac794a7a281ca1b4c6f2993bc05d81f4d3e90ba6ad4beb76a8e78f1e0164c17ece5b10d1a4eca9cb5f3fb7a2de4e84010564  libspng-0.7.2.tar.gz
"
